/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.skatiger.jrove;

import java.io.IOException;
import java.net.URL;

import javax.el.ELContext;
import javax.el.ELException;
import javax.el.ExpressionFactory;
import javax.el.FunctionMapper;
import javax.el.VariableMapper;

import org.skatiger.jrove.component.UIComponent;

public abstract class JroveContext extends ELContext
        implements TemplateContext {
    public abstract ViewContext getViewContext();
    
    public abstract String generateUniqueId(String id);

    public abstract ExpressionFactory getExpressionFactory();

    public abstract boolean includeDefinition(UIComponent parent, String name)
            throws IOException, JroveException, ELException;

    public abstract void includeJrove(UIComponent parent, String relativePath)
            throws IOException, JroveException, ELException;

    public abstract void includeJrove(UIComponent parent, URL absolutePath)
            throws IOException, JroveException, ELException;

    public abstract void setFunctionMapper(FunctionMapper fnMapper);

    public abstract void setVariableMapper(VariableMapper varMapper);

    public abstract void setAttribute(String name, Object value) ;
    
    public abstract Object getAttribute(String name) ;
}
